#include "StdAfx.h"
#include "BallTracker.h"

using namespace std;
using namespace cv;

//This class is not being used.

BallTracker::BallTracker(Frame startingFrame) : _frame(startingFrame) {

}

Mat BallTracker::locateBall() {
	Mat hsvImg;
	cvtColor(_frame._cvFrame, hsvImg, CV_BGR2HSV);
	Mat threshold;

	inRange(hsvImg, Scalar(0.11*256, 0.60*256, 0.20*256,0), 
		Scalar(0.14*256, 1.0*256, 1.0*256,0), threshold);
	imshow("Ball", threshold);
	return threshold;
}

void BallTracker::updateFrame(Frame newFrame) {
	_frame = newFrame;
}


BallTracker::~BallTracker(void)
{
}
